package com.sqx.modules.errand.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.sqx.modules.app.entity.UserEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.sql.Timestamp;
import java.time.LocalDateTime;

@Data
@ApiModel("评价")
@TableName("sys_evaluate")
public class Evaluate implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO, value = "evaluate_id")
    /**
     * 主键id
     */
    @ApiModelProperty("主键id")
    private Integer evaluateId;

    /**
     * 用户id
     */
    @ApiModelProperty("用户id")
    @TableField(value = "user_id")
    private Long userId;

    @TableField(exist = false)
    private UserEntity user;

    /**
     * 师傅id
     */
    @ApiModelProperty("师傅id")
    @TableField(value = "rider_user_id")
    private Long riderUserId;

    @TableField(exist = false)
    private UserEntity riderUser;

    /**
     * 订单号
     */
    @ApiModelProperty("订单号")
    @TableField(value = "indent_number")
    private String indentNumber;

    @TableField(exist = false)
    private Indent indent;

    /**
     * 评价内容
     */
    @ApiModelProperty("评价内容")
    @TableField(value = "evaluate_message")
    private String evaluateMessage;

    /**
     * 是否满意
     */
    @ApiModelProperty("是否满意 0：满意  1：不满意")
    @TableField(value = "satisfaction_flag")
    private String satisfactionFlag;

    /**
     * 评价时间
     */
    @ApiModelProperty("评价时间")
    @TableField(value = "create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    /**
     * 用户昵称
     */
    @TableField(exist = false)
    private String nickName;

    /**
     * 用户头像
     */
    @TableField(exist = false)
    private String avatar;

}